<div id="content">
    <h2>Daftar Produk</h2>
    <?php if ($products_model !== null): ?>
        <div class="product-list">
            <ul class="grid">
                <?php foreach ($products_model as $row_products): ?>
                <?php
                $products_thumbnail = $row_products->products_thumbnail;
                if($products_thumbnail == '' || ($products_thumbnail != '' && !file_exists(Yii::app()->params['config']['updir']['products'].$products_thumbnail))) {
                    $products_thumbnail = '_default_thumb.png';
                }
                ?>
                    <li><a href="<?php echo Yii::app()->createAbsoluteUrl('products/detail/'.$row_products->products_id.'/'.function_lib::url_title($row_products->products_title)); ?>"><div class="img"><?php echo CHtml::image(Yii::app()->params['config']['dir']['products'].$products_thumbnail, (($products_thumbnail != null) ? $row_products->products_title : ''), array('width' => 106)); ?></div><p><?php echo $row_products->products_title; ?></p></a></li>
                <?php endforeach; ?>
            </ul>
            <div class="clearfix"></div>
            <div class="pager">
                <div class="paging clearfix">
                    <?php
                    $this->widget('application.extensions.pagination.PaginationWidget', array(
                        'CPaginationObject' => $products_pagination,
                        'PaginationHeader' => 'Daftar Produk :'
                    ));
                    ?>
                </div>
            </div>
        </div>
    <?php endif; ?>
</div><!-- #content-->